<template>
  <div>
    <van-address-edit
      :show-area="false"
      show-set-default
      show-search-result
      :search-result="searchResult"
      :area-columns-placeholder="['请选择', '请选择', '请选择']"
      @save="onSave"
    />
  </div>
</template>

<script>


export default {
  data() {
    return {
      searchResult: []
    };
  },
  methods: {
    onSave(content) {
      console.log(content);
      const obj = {
        id: new Date().getTime().toString(),
        name: content.name,
        address: content.addressDetail,
        tel: content.tel
      }
      this.$store.commit('ADD_ADDRESS', obj)
      this.$router.back()
    },
  }
};
</script>